From 86179ae11a3790cc72de35d663f3f7a5d02af564 Mon Sep 17 00:00:00 2001 From: Pierre Bernard Date: Fri, 17 Apr 2020 14:17:18 +0200 Subject: [PATCH] Added support for Qstarz BL-1000 .BIN files (#515) * Added support for Qstarz BL-1000 .BIN files * Use FormatSpecificData * Updates based on pull request comments * Remove executable bit on Qstarz sample file * include-what-you-use headers * Added format documentation for qstarz_bl_1000 Co-authored-by: gloubibou --- CMakeLists.txt | 2 +- GPSBabel.pro | 2 +- Makefile.in | 5 +- formspec.h | 1 + qstarz_bl_1000.cc | 300 +++++++++++++++++++ qstarz_bl_1000.h | 93 ++++++ reference/format0.txt | 1 + reference/format1.txt | 1 + reference/format2.txt | 1 + reference/format3.txt | 2 + reference/help.txt | 1 + reference/qstarz_bl-1000.BIN | Bin 0 -> 2944 bytes reference/qstarz_bl-1000.gpx | 472 ++++++++++++++++++++++++++++++ testo.d/qstarz_bl_1000.test | 9 + vecs.h | 10 + xmldoc/formats/qstarz_bl-1000.xml | 7 + 16 files changed, 904 insertions(+), 3 deletions(-) create mode 100644 qstarz_bl_1000.cc create mode 100644 qstarz_bl_1000.h create mode 100644 reference/qstarz_bl-1000.BIN create mode 100644 reference/qstarz_bl-1000.gpx create mode 100644 testo.d/qstarz_bl_1000.test create mode 100644 xmldoc/formats/qstarz_bl-1000.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index 09c2923cd..ec463fadd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ set(ALL_FMTS vpl.cc teletype.cc jogmap.cc bushnell.cc bushnell_trl.cc wintec_tes.cc subrip.cc garmin_xt.cc garmin_fit.cc mtk_locus.cc googledir.cc mapbar_track.cc mapfactor.cc f90g_track.cc - energympro.cc mynav.cc ggv_bin.cc globalsat_sport.cc geojson.cc + energympro.cc mynav.cc ggv_bin.cc globalsat_sport.cc geojson.cc qstarz_bl_1000.cc ) #DEPRECATED_FMTS=cetus.cc copilot.cc gpspilot.cc magnav.cc psp.cc gcdb.cc quovadis.cc gpilots.cc geoniche.cc palmdoc.cc hsa_ndv.cc coastexp.cc pathaway.cc coto.cc msroute.cc mag_pdb.cc axim_gpb.cc delbin.cc google.cc diff --git a/GPSBabel.pro b/GPSBabel.pro index 9b162b63c..3d69f7562 100644 --- a/GPSBabel.pro +++ b/GPSBabel.pro @@ -46,7 +46,7 @@ ALL_FMTS=$$MINIMAL_FMTS gtm.cc gpsutil.cc pcx.cc \ vpl.cc teletype.cc jogmap.cc bushnell.cc bushnell_trl.cc wintec_tes.cc \ subrip.cc garmin_xt.cc garmin_fit.cc \ mtk_locus.cc googledir.cc mapbar_track.cc mapfactor.cc f90g_track.cc \ - energympro.cc mynav.cc ggv_bin.cc globalsat_sport.cc geojson.cc + energympro.cc mynav.cc ggv_bin.cc globalsat_sport.cc geojson.cc qstarz_bl_1000.cc DEPRECATED_FMTS=cetus.cc copilot.cc gpspilot.cc magnav.cc psp.cc gcdb.cc quovadis.cc gpilots.cc geoniche.cc palmdoc.cc hsa_ndv.cc coastexp.cc pathaway.cc coto.cc msroute.cc mag_pdb.cc axim_gpb.cc delbin.cc google.cc diff --git a/Makefile.in b/Makefile.in index 1771cd8f4..a7053b6be 100644 --- a/Makefile.in +++ b/Makefile.in @@ -85,7 +85,7 @@ ALL_FMTS=$(MINIMAL_FMTS) gtm.o gpsutil.o \ vpl.o teletype.o jogmap.o bushnell.o bushnell_trl.o wintec_tes.o \ subrip.o garmin_xt.o garmin_fit.o \ mtk_locus.o googledir.o mapbar_track.o f90g_track.o mapfactor.o energympro.o \ - mynav.o ggv_bin.o globalsat_sport.o geojson.o + mynav.o ggv_bin.o globalsat_sport.o geojson.o qstarz_bl_1000.o FMTS=@FMTS@ @@ -922,6 +922,9 @@ position.o: position.cc defs.h config.h zlib/zlib.h zlib/zconf.h \ psitrex.o: psitrex.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \ garmin_tables.h +qstarz_bl_1000.o: qstarz_bl_1000.cc defs.h config.h zlib/zlib.h zlib/zconf.h \ + formspec.h inifile.h gbfile.h session.h src/core/datetime.h \ + src/core/optional.h format.h radius.o: radius.cc defs.h config.h zlib/zlib.h zlib/zconf.h formspec.h \ inifile.h gbfile.h session.h src/core/datetime.h src/core/optional.h \ radius.h filter.h grtcirc.h diff --git a/formspec.h b/formspec.h index 075c54ab1..7b2665529 100644 --- a/formspec.h +++ b/formspec.h @@ -31,6 +31,7 @@ enum FsType { kFsAn1V = 0x616e3176L, kFsOzi = 0x6f7a6900L, kFsGmsd = 0x474d5344L, /* GMSD = Garmin specific data */ + kFsQstarzBl1000 = 0x5173747aL, kFsLowranceusr4 = 0x615f234cL }; diff --git a/qstarz_bl_1000.cc b/qstarz_bl_1000.cc new file mode 100644 index 000000000..b09ea1ae5 --- /dev/null +++ b/qstarz_bl_1000.cc @@ -0,0 +1,300 @@ +/* + Handle Qstarz BL-1000 .BIN files. + + Saved in the SESSION/GPSLog folder. There will 3 files sharing the same base name: .BIN, .POI, and .DAT. + Only the .BIN file is of interest to us. + + Copyright (C) 2020 Pierre Bernard, pierre.bernard@houdah.com + Copyright (C) 2001-2020 Robert Lipe, robertlipe+source@gpsbabel.org + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + */ + +#include "qstarz_bl_1000.h" + +#include // for round +#include // for QChar +#include // for QDataStream, QDataStream::SinglePrecision, QDataStream::DoublePrecision, QDataStream::LittleEndian, QDataStream::Ok +#include // for QDebug +#include // for QFile +#include // for QIODevice, QIODevice::ReadOnly +#include "defs.h" // for Waypoint, ddmm2degrees, route_head, track_add_head, track_add_wpt, waypt_add, waypt_count, wp_flags, fix_unknown, fix_2d, fix_3d, fix_dgps, fix_none, fix_pps, fix_type, global_options, global_opts +#include "src/core/logging.h" // for Fatal + + +#define MYNAME "Qstarz BL-1000" + + +enum BL1000_POINT_TYPE { + BL1000_POINT_TYPE_UNKNOWN = '-', + BL1000_POINT_TYPE_WAY_POINT = 'B', // Button push + BL1000_POINT_TYPE_TRACK_POINT_BY_TIME = 'T', + BL1000_POINT_TYPE_TRACK_POINT_BY_DISTANCE = 'D', + BL1000_POINT_TYPE_TRACK_POINT_BY_SPEED = 'S', +}; + + +/*************************************************************************** + * local helper functions * + ***************************************************************************/ + +inline bool qstarz_bl_1000_is_waypoint_type(BL1000_POINT_TYPE type) +{ + return (type == BL1000_POINT_TYPE_WAY_POINT); +} + +inline bool qstarz_bl_1000_is_trackpoint_type(BL1000_POINT_TYPE type) +{ + return ( + (type == BL1000_POINT_TYPE_TRACK_POINT_BY_TIME) || + (type == BL1000_POINT_TYPE_TRACK_POINT_BY_DISTANCE) || + (type == BL1000_POINT_TYPE_TRACK_POINT_BY_SPEED) + ); +} + +void +QstarzBL1000Format::qstarz_bl_1000_read(QDataStream& stream) +{ + auto* track_route = new route_head; + + track_add_head(track_route); + + while (!stream.atEnd()) { + qstarz_bl_1000_read_record(stream, track_route); + } +} + +void +QstarzBL1000Format::qstarz_bl_1000_read_record(QDataStream& stream, route_head* track_route) +{ + // Value fields in 64-byte log entry + quint8 fixStatus; // 0 + qint8 rcr; // 1 + quint16 milliseconds; // 2-3 + double dLatitude; // 4-11 + double dLongitude; // 12-19 + quint32 time; // 20-23 + float speed; // 24-27 + float altitude; // 28-31 + float heading; // 32-35 + qint16 gx; // 36-37 + qint16 gy; // 38-39 + qint16 gz; // 40-41 + quint16 maxSNR; // 42-43 + float hdop; // 44-47 + float vdop; // 48-51 + qint8 satelliteCountView; // 52 + qint8 satelliteCountUsed; // 53 + quint8 fixQuality; // 54 + quint8 batteryPercent; // 55 + quint32 unused1; // 56-59 + quint32 unused2; // 60-64 + + stream >> fixStatus; + stream >> rcr; + stream >> milliseconds; + + stream.setFloatingPointPrecision(QDataStream::DoublePrecision); + stream >> dLatitude; + stream >> dLongitude; + + stream >> time; + + stream.setFloatingPointPrecision(QDataStream::SinglePrecision); + stream >> speed; + stream >> altitude; + stream >> heading; + + stream >> gx; + stream >> gy; + stream >> gz; + stream >> maxSNR; + + stream.setFloatingPointPrecision(QDataStream::SinglePrecision); + stream >> hdop; + stream >> vdop; + + stream >> satelliteCountView; + stream >> satelliteCountUsed; + stream >> fixQuality; + stream >> batteryPercent; + stream >> unused1; + stream >> unused2; + + if (stream.status() != QDataStream::Ok) { + Fatal() << MYNAME << ": File format error on " << read_fname << ". Perhaps this isn't a Qstarz BL-1000 file"; + } + + BL1000_POINT_TYPE type; + + switch (rcr) { + case 'B': + type = BL1000_POINT_TYPE_WAY_POINT; + break; + case 'T': + type = BL1000_POINT_TYPE_TRACK_POINT_BY_TIME; + break; + case 'D': + type = BL1000_POINT_TYPE_TRACK_POINT_BY_DISTANCE; + break; + case 'S': + type = BL1000_POINT_TYPE_TRACK_POINT_BY_SPEED; + break; + case 'W': // Power On + case 'X': // Power Off + case 'Y': // USB plug in + case 'Z': // USB removed + case 'C': // Cali G-sensor + case 'A': // Enter Smart Mode(Power Saving) + case 'R': // Reserved + case 'N': // Reserved + case 'M': // Reserved + case 'G': // Reserved + case 'H': // Reserved + case 'I': // Reserved + case 'J': // Reserved + type = BL1000_POINT_TYPE_UNKNOWN; + break; + default: + type = BL1000_POINT_TYPE_UNKNOWN; + + Fatal() << MYNAME << ": File format error on " << read_fname << ". Unexpected value for RCR (record reason): " << rcr; + + break; + } + + fix_type fix; + + switch (fixQuality) { + case 1: + switch (fixStatus) { + case 1: + fix = fix_none; + break; + case 2: + fix = fix_2d; + break; + case 3: + fix = fix_3d; + break; + default: + fix = fix_unknown; + break; + } + break; + case 2: + fix = fix_dgps; + break; + case 3: + fix = fix_pps; + break; + default: + fix = fix_unknown; + + if (type != BL1000_POINT_TYPE_UNKNOWN) { + Fatal() << MYNAME << ": File format error on " << read_fname << ". Unexpected value for fix quality: " << fixQuality; + } + + break; + } + + auto* waypoint = new Waypoint(); + + waypoint->latitude = ddmm2degrees(dLatitude); + waypoint->longitude = ddmm2degrees(dLongitude); + + // qDebug(waypoint) + + if ((waypoint->latitude < -90) || (waypoint->latitude > 90)) { + Fatal() << MYNAME << ": File format error on " << read_fname << ". Unexpected value for latitude: " << waypoint->latitude; + } + + if ((waypoint->longitude < -180) || (waypoint->longitude > 180)) { + Fatal() << MYNAME << ": File format error on " << read_fname << ". Unexpected value for longitude: " << waypoint->longitude; + } + + waypoint->altitude = altitude; + + waypoint->hdop = round(hdop * 1000) / 1000; + waypoint->vdop = round(vdop * 1000) / 1000; + waypoint->fix = fix; + waypoint->sat = satelliteCountUsed; + + waypoint->speed = KPH_TO_MPS(speed); + waypoint->wpt_flags.speed = 1; + + waypoint->course = heading; + waypoint->wpt_flags.course = 1; + waypoint->SetCreationTime(time, milliseconds); + + auto* fsdata = new qstarz_bl_1000_fsdata; + + waypoint->fs.FsChainAdd(fsdata); + + fsdata->accelerationX = gx / 256.0; + fsdata->accelerationY = gy / 256.0; + fsdata->accelerationZ = gz / 256.0; + + fsdata->satTotal = satelliteCountView; + fsdata->maxSNR = maxSNR; + fsdata->batteryPercent = batteryPercent; + + if (qstarz_bl_1000_is_waypoint_type(type)) { + if (global_opts.synthesize_shortnames) { + waypoint->shortname = QString("WP%2").arg(waypt_count() + 1, 3, 10, QChar('0')); + waypoint->wpt_flags.shortname_is_synthetic = 1; + } + waypt_add(waypoint); + } else if (qstarz_bl_1000_is_trackpoint_type(type)) { + track_add_wpt(track_route, waypoint, "TP", 3); + } else { + delete waypoint; + } +} + + +/*************************************************************************** + * entry points called by gpsbabel main process * + ***************************************************************************/ + +void +QstarzBL1000Format::rd_init(const QString& fname) +{ + read_fname = fname; +} + +void +QstarzBL1000Format::rd_deinit() +{ + read_fname.clear(); +} + +void +QstarzBL1000Format::read() +{ + QFile file(read_fname); + if (!file.open(QIODevice::ReadOnly)) { + Fatal() << MYNAME << ": Error opening file " << read_fname; + } + + QDataStream stream(&file); + + stream.setByteOrder(QDataStream::LittleEndian); + + qstarz_bl_1000_read(stream); + + file.close(); +} diff --git a/qstarz_bl_1000.h b/qstarz_bl_1000.h new file mode 100644 index 000000000..67cb60d86 --- /dev/null +++ b/qstarz_bl_1000.h @@ -0,0 +1,93 @@ +/* + Handle Qstarz BL-1000 .BIN files. + + Saved in the SESSION/GPSLog folder. There will 3 files sharing the same base name: .BIN, .POI, and .DAT. + Only the .BIN file is of interest to us. + + Copyright (C) 2020 Pierre Bernard, pierre.bernard@houdah.com + Copyright (C) 2001-2020 Robert Lipe, robertlipe+source@gpsbabel.org + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + */ + +#ifndef QSTARZ_BL1000_H_INCLUDED_ +#define QSTARZ_BL1000_H_INCLUDED_ + +#include // for QDataStream +#include // for QString +#include // for QVector +#include // for qint8, quint16, quint8 + +#include "defs.h" // for ff_cap, ff_cap_read, ff_cap_none, CET_CHARSET_ASCII, ff_type, ff_type_file, route_head +#include "format.h" // for Format +#include "formspec.h" // for FormatSpecificData, kFsQstarzBl1000 + +struct qstarz_bl_1000_fsdata : FormatSpecificData { + qstarz_bl_1000_fsdata() : FormatSpecificData(kFsQstarzBl1000) {} + + qstarz_bl_1000_fsdata* clone() const override + { + return new qstarz_bl_1000_fsdata(*this); + } + + char rcr; // record reason. possible values are listed in switch-case in .cc file + float accelerationX; // horizonal acceleration value measured in acceleration due to gravity or g + float accelerationY; // vertical acceleration value measured in acceleration due to gravity or g + float accelerationZ; // depth acceleration value measured in acceleration due to gravity or g + quint16 maxSNR; + qint8 satTotal; // satellite count (view) + quint8 batteryPercent; +}; + +class QstarzBL1000Format : public Format +{ +public: + ff_type get_type() const override + { + return ff_type_file; + } + + QVector get_cap() const override + { + return { + ff_cap_read, // waypoints + ff_cap_read, // tracks + ff_cap_none // routes + }; + } + + QString get_encode() const override + { + return CET_CHARSET_ASCII; + } + + int get_fixed_encode() const override + { + return 0; + } + + void rd_init(const QString& fname) override; + void read() override; + void rd_deinit() override; + void qstarz_bl_1000_read(QDataStream& stream); + void qstarz_bl_1000_read_record(QDataStream& stream, route_head* track_route); + +private: + QString read_fname; +}; + + +#endif diff --git a/reference/format0.txt b/reference/format0.txt index f86fce302..f3b196498 100644 --- a/reference/format0.txt +++ b/reference/format0.txt @@ -126,6 +126,7 @@ ozi OziExplorer pocketfms_bc PocketFMS breadcrumbs pocketfms_fp xml PocketFMS flightplan (.xml) pocketfms_wp txt PocketFMS waypoints (.txt) +qstarz_bl-1000 Qstarz BL-1000 raymarine rwf Raymarine Waypoint File (.rwf) ricoh log Ricoh GPS Log File cup cup See You flight analysis data diff --git a/reference/format1.txt b/reference/format1.txt index 88ae75533..d63673b78 100644 --- a/reference/format1.txt +++ b/reference/format1.txt @@ -130,6 +130,7 @@ file ozi OziExplorer file pocketfms_bc PocketFMS breadcrumbs file pocketfms_fp xml PocketFMS flightplan (.xml) file pocketfms_wp txt PocketFMS waypoints (.txt) +file qstarz_bl-1000 Qstarz BL-1000 file raymarine rwf Raymarine Waypoint File (.rwf) file ricoh log Ricoh GPS Log File file cup cup See You flight analysis data diff --git a/reference/format2.txt b/reference/format2.txt index 0aaeaef97..640c4e7e5 100644 --- a/reference/format2.txt +++ b/reference/format2.txt @@ -130,6 +130,7 @@ file rwrwrw ozi OziExplorer file --rw-- pocketfms_bc PocketFMS breadcrumbs file r---r- pocketfms_fp xml PocketFMS flightplan (.xml) file rw---- pocketfms_wp txt PocketFMS waypoints (.txt) +file r-r--- qstarz_bl-1000 Qstarz BL-1000 file rw--rw raymarine rwf Raymarine Waypoint File (.rwf) file --rw-- ricoh log Ricoh GPS Log File file rw---- cup cup See You flight analysis data diff --git a/reference/format3.txt b/reference/format3.txt index 2e94d8ffc..7398ea5df 100644 --- a/reference/format3.txt +++ b/reference/format3.txt @@ -1196,6 +1196,8 @@ file r---r- pocketfms_fp xml PocketFMS flightplan (.xml) pocketfms_fp https://www.gpsbabel.org/WEB_DOC_DIR/fmt_pocketfms_fp.html file rw---- pocketfms_wp txt PocketFMS waypoints (.txt) pocketfms_wp https://www.gpsbabel.org/WEB_DOC_DIR/fmt_pocketfms_wp.html +file r-r--- qstarz_bl-1000 Qstarz BL-1000 qstarz_bl-1000 + https://www.gpsbabel.org/WEB_DOC_DIR/fmt_qstarz_bl-1000.html file rw--rw raymarine rwf Raymarine Waypoint File (.rwf) raymarine https://www.gpsbabel.org/WEB_DOC_DIR/fmt_raymarine.html option raymarine location Default location string My Waypoints https://www.gpsbabel.org/WEB_DOC_DIR/fmt_raymarine.html#fmt_raymarine_o_location diff --git a/reference/help.txt b/reference/help.txt index edd3bb9dd..b9b4c08c5 100644 --- a/reference/help.txt +++ b/reference/help.txt @@ -602,6 +602,7 @@ File Types (-i and -o options): pocketfms_bc PocketFMS breadcrumbs pocketfms_fp PocketFMS flightplan (.xml) pocketfms_wp PocketFMS waypoints (.txt) + qstarz_bl-1000 Qstarz BL-1000 raymarine Raymarine Waypoint File (.rwf) location Default location ricoh Ricoh GPS Log File diff --git a/reference/qstarz_bl-1000.BIN b/reference/qstarz_bl-1000.BIN new file mode 100644 index 0000000000000000000000000000000000000000..38d992cfea9841f31e852c73f9e9919e315ff290 GIT binary patch literal 2944 zcmbW(YgANK6bJA-qKym)n&1-wg_U4Fc>2i4J@;J85nLv$L@>q2Y89oFx_lyNN&}h* zC~D4NB!Y?~j+lt}zz3+XCb<5quY^WY~i3%-Im=4a8EHBVG2Ej-o_7(dXP z{Ql`z=bb?xi{7=Hjv2GoNvbIZ{w*{@4~4Iw(;g8^8lyzJjusy4FF&5@K)&Eg-9hpz z(f_eHmgOzjBo(?I=Y?~PaCmi$yxLX=ofU;vq9hMC7t#d zPlj5!i~TQmN)~n62+_{gqCWN?ys_p9%`fz=z5rMSL{~LWza9x2%ur&(lY)An)S+p=T-j4KM0n z+@au3hLb!6u7R(@?^XR49{YFlEI39!`*d_P`84#`ns>08Hy!5^Q*L&UyJ(aBW|9$L-Q+8UtM2@J_G&O>*>ri zu?siec9C=8Aq>U+dpZBsesO?9<4E*fjlKr*+2~JX?_)Y`Z|?NDubc>GXm8;=S2l9K-CpK?n zDq}A`zepqN;U=iss*k=QTk`|?n}M~#G`|DrQ|ElgcD&n@`(IikFNGV>y)BRZ_vtgm zgVyhQYrGx#gXphZ%3w`i=+idJsZb7=g#f`YZk0G%HAU>CYL#Ebr$9ct8j>l0htVJM z%VZ;GxN!BXB-sEacpKOMT95rdiInG!LjSn=;c3c$5qipxF{>{(KUpK6fXg7Dr?abh z5F&Q6Ygympzr`XaD3HPt9{^LXQ7YsvxsCi`-`TOX_ z4QY7(?D#atAUO;=2sswMljZ!e|G(}In-GA$HmJRxd;|K<;Tl#StK#OEQSx%UzwhGw zU)FEoG5<3z#jo~5&y~}Q$v2{Zx^SELYvmi<`xj?f3%|oKEA#Jd+PuXVz2jSFOUXY* zKdJa5cC*5U3oH=xa}7ExhPRm=yZ#pSaegu2)_)-S_^5qR z#9E z*bD!`?F*9I*<^VgRD;rrKl;ne91rxLopQfdgnkTq`u^FsyCSJGQ}O<(he9jo_sz^M zb7_9zx#oW4)#&r?Ze^XrtE9qb8{{bHD5$LDCqp}PIPKr~ZO$R&-+$4+PFpCQ|1n?s z^Vu0lveN(F$Q8ROKUZsf%gIkhe{97be81@N{i5Je`2F^=;#bAmI#Yi8``-wo`AtJl z`N=QaBpJr}@y+lUY^?M@C&S~>AoK-3c6H=up{Ms(U}TQ;TSy%L3Le2NEBPH-8~nu( q^x-u + + + + + 8.092 + + WPT001 + WPT001 + WPT001 + 3d + 4 + 0.660000 + 0.980000 + + + 17.455 + + WPT002 + WPT002 + WPT002 + 3d + 8 + 1.450000 + 0.910000 + + + 21.537 + + WPT003 + WPT003 + WPT003 + 3d + 9 + 1.110000 + 0.850000 + + + 25.720 + + WPT004 + WPT004 + WPT004 + 3d + 9 + 1.110000 + 0.850000 + + + 33.871 + + WPT005 + WPT005 + WPT005 + 3d + 9 + 1.110000 + 0.850000 + + + 39.305 + + WPT006 + WPT006 + WPT006 + 3d + 9 + 1.110000 + 0.850000 + + + 38.290 + + WPT007 + WPT007 + WPT007 + 3d + 10 + 1.010000 + 0.840000 + + + 39.093 + + WPT008 + WPT008 + WPT008 + 3d + 10 + 1.010000 + 0.840000 + + + 40.247 + + WPT009 + WPT009 + WPT009 + 3d + 11 + 0.910000 + 0.820000 + + + 36.111 + + WPT010 + WPT010 + WPT010 + 3d + 12 + 0.850000 + 0.800000 + + + 35.846 + + WPT011 + WPT011 + WPT011 + 3d + 12 + 0.860000 + 0.800000 + + + 33.704 + + WPT012 + WPT012 + WPT012 + 3d + 12 + 0.860000 + 0.800000 + + + 32.540 + + WPT013 + WPT013 + WPT013 + 3d + 12 + 0.860000 + 0.800000 + + + + + 16.226 + + 85.070000 + 1.533044 + 3d + 7 + 1.660000 + 0.940000 + + + 18.556 + + 94.059998 + 1.095767 + 3d + 8 + 1.240000 + 0.860000 + + + 21.337 + + 93.800003 + 1.476456 + 3d + 9 + 1.110000 + 0.850000 + + + 32.409 + + 95.839996 + 1.394144 + 3d + 9 + 1.110000 + 0.850000 + + + 34.995 + + 88.519997 + 1.389000 + 3d + 9 + 1.110000 + 0.850000 + + + 36.327 + + 156.889999 + 1.352989 + 3d + 9 + 1.110000 + 0.850000 + + + 38.900 + + 177.429993 + 1.507322 + 3d + 9 + 1.110000 + 0.850000 + + + 38.710 + + 267.480011 + 1.275822 + 3d + 9 + 1.110000 + 0.850000 + + + 38.318 + + 273.649994 + 1.383856 + 3d + 9 + 1.110000 + 0.850000 + + + 40.410 + + 273.959991 + 1.414722 + 3d + 11 + 0.910000 + 0.820000 + + + 38.466 + + 267.760010 + 1.409578 + 3d + 12 + 0.860000 + 0.800000 + + + 35.997 + + 270.010010 + 1.342700 + 3d + 12 + 0.860000 + 0.800000 + + + 37.212 + + 281.559998 + 0.967156 + 3d + 12 + 0.860000 + 0.800000 + + + 34.867 + + 214.130005 + 1.275822 + 3d + 12 + 0.860000 + 0.800000 + + + 34.900 + + 202.059998 + 1.280967 + 3d + 12 + 0.860000 + 0.800000 + + + 34.622 + + 188.479996 + 1.157500 + 3d + 12 + 0.860000 + 0.800000 + + + 32.953 + + 181.250000 + 0.992878 + 3d + 12 + 0.860000 + 0.800000 + + + 31.464 + + 176.839996 + 1.193511 + 3d + 12 + 0.860000 + 0.800000 + + + 32.151 + + 181.100006 + 1.275822 + 3d + 12 + 0.860000 + 0.800000 + + + 30.846 + + 179.210007 + 1.399289 + 3d + 12 + 0.860000 + 0.800000 + + + 30.044 + + 180.139999 + 1.172933 + 3d + 12 + 0.860000 + 0.800000 + + + 27.201 + + 185.139999 + 1.440444 + 3d + 12 + 0.860000 + 0.800000 + + + 26.132 + + 217.850006 + 0.972300 + 3d + 11 + 0.940000 + 0.800000 + + + 25.763 + + 283.320007 + 1.301545 + 3d + 12 + 0.860000 + 0.800000 + + + 25.861 + + 285.540009 + 1.301545 + 3d + 12 + 0.860000 + 0.800000 + + + 27.001 + + 289.260010 + 1.352989 + 3d + 12 + 0.860000 + 0.800000 + + + 26.668 + + 291.989990 + 1.327267 + 3d + 12 + 0.860000 + 0.800000 + + + 23.075 + + 22.600000 + 1.301545 + 3d + 12 + 0.860000 + 0.800000 + + + 21.345 + + 32.419998 + 1.471311 + 3d + 12 + 0.860000 + 0.800000 + + + 18.598 + + 44.570000 + 1.172933 + 3d + 12 + 0.860000 + 0.800000 + + + 21.046 + + 63.330002 + 1.394144 + 3d + 12 + 0.860000 + 0.800000 + + + 21.881 + + 35.980000 + 1.162645 + 3d + 12 + 0.860000 + 0.800000 + + + + diff --git a/testo.d/qstarz_bl_1000.test b/testo.d/qstarz_bl_1000.test new file mode 100644 index 000000000..b0e2ccc42 --- /dev/null +++ b/testo.d/qstarz_bl_1000.test @@ -0,0 +1,9 @@ +# +# qstarz_bl-1000 logger tests +# +FORMAT=qstarz_bl-1000 + +rm -f ${TMPDIR}/$FORMAT.* + +gpsbabel -i $FORMAT -f ${REFERENCE}/$FORMAT.BIN -o gpx -F ${TMPDIR}/$FORMAT.gpx >/dev/null +compare ${REFERENCE}/$FORMAT.gpx ${TMPDIR}/$FORMAT.gpx diff --git a/vecs.h b/vecs.h index 7d033a840..5c96ac1d8 100644 --- a/vecs.h +++ b/vecs.h @@ -35,7 +35,9 @@ #include "legacyformat.h" #include "lowranceusr.h" #include "mynav.h" +#include "qstarz_bl_1000.h" #include "nmea.h" +#include "qstarz_bl_1000.h" #include "random.h" #include "shape.h" #include "xcsv.h" @@ -409,6 +411,7 @@ private: GeoJsonFormat geojson_fmt; GgvBinFormat ggv_bin_fmt; LegacyFormat globalsat_sport_fmt {globalsat_sport_vecs}; + QstarzBL1000Format qstarz_bl_1000_fmt; #endif // MAXIMAL_ENABLED const QVector vec_list { @@ -1313,6 +1316,13 @@ private: "GlobalSat GH625XT GPS training watch", nullptr, nullptr, + }, + { + &qstarz_bl_1000_fmt, + "qstarz_bl-1000", + "Qstarz BL-1000", + nullptr, + nullptr, } #endif // MAXIMAL_ENABLED }; diff --git a/xmldoc/formats/qstarz_bl-1000.xml b/xmldoc/formats/qstarz_bl-1000.xml new file mode 100644 index 000000000..97b608826 --- /dev/null +++ b/xmldoc/formats/qstarz_bl-1000.xml @@ -0,0 +1,7 @@ + +This format is used by the Qstarz BL-1000GT and BL-1000ST. + + + +These Qstarz devices are file based. GPS logs are saved as *.BIN files to the SESSION/GPSLog folder. + -- 2.30.2